<!DOCTYPE html>
<html lang="zh-CN">
	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<!-- uc强制竖屏 -->
		<meta name="screen-orientation" content="portrait">
		<!-- qq强制竖屏 -->
		<meta name="x5-orientation" content="portrait">
		<!-- uc应用模式 -->
		<meta name="browsermode" content="application">
		<!-- qq应用模式 -->
		<meta name="x5-page-mode" content="app">
		<title>
			<%= htmlWebpackPlugin.options.title %>
		</title>
		<style>
			#loader {
				width: 100vw;
				height: 100vh;
				display: flex;
				align-items: center;
				justify-content: center;
				position: relative;
			}

			#loader::before {
				content: "";
				position: absolute;
				width: 120px;
				height: 120px;
				box-sizing: border-box;
				border-radius: 10px;
				background-color: rgba(0, 0, 0, 0.5);
			}

			#loader::after {
				content: "";
				position: absolute;
				width: 40px;
				height: 40px;
				animation: spin 1.2s linear infinite;
				border: 5px solid #333;
				border-radius: 50%;
				border-top: 5px solid #f3f3f3;
			}

			@keyframes spin {
				100% {
					transform: rotate(360deg);
				}
			}
		</style>
		<!-- <script>
			var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
			document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')
		</script> -->
		<link rel="stylesheet" href="<%= BASE_URL %>static/index.<%= VUE_APP_INDEX_CSS_HASH %>.css" />
		<link rel="icon" href="<%= BASE_URL %>static/favicon.ico" />
	</head>
	<body style="-webkit-text-size-adjust: 100%!important;">
		<noscript>
			<strong>Please enable JavaScript to continue.</strong>
		</noscript>
		<div id="app">
			<div id="loader"></div>
		</div>
		<!-- built files will be auto injected -->
		<script type="text/javascript">
			/**
			 * 重置微信默认字体
			 */
			(function() {
				if (typeof WeixinJSBridge == "object" && typeof WeixinJSBridge.invoke == "function") {
					handleFontSize();
				} else {
					if (document.addEventListener) {
						document.addEventListener("WeixinJSBridgeReady", handleFontSize, false);
					} else if (document.attachEvent) {
						document.attachEvent("WeixinJSBridgeReady", handleFontSize);
						document.attachEvent("onWeixinJSBridgeReady", handleFontSize);
					}
				}

				function handleFontSize() {
					WeixinJSBridge.invoke('setFontSizeCallback', {
						'fontSize': 0
					});
					WeixinJSBridge.on('menu:setfont', function() {
						WeixinJSBridge.invoke('setFontSizeCallback', {
							'fontSize': 0
						});
					});
				}
			})();
			/**
			 * 重置微信默认字体 end
			 */
			/**
			 * APP内加载不显示Loading
			 */
			let urlStr = window.location.href.split('?')[1];
			let hashes = urlStr?.split('&');
			const params = {};
			hashes?.forEach((hash) => {
				const [key, val] = hash.split('=');
				params[key] = decodeURIComponent(val);
			});
			if (params.from && params.from != 'web') {
				document.querySelector('#loader').style.visibility = 'hidden'
			}
			/**
			 * APP内加载不显示Loading end
			 */
			/**
			 * 获取IP
			 * @param {Object} json
			 */
			function getIP(json) {
				if (json && json.ip) {
					window.clientIP = json.ip
					sessionStorage.setItem('user_client_ip', json.ip)
				}
			}
			const asyncLoad = function (){
				var hm = document.createElement("script");
				hm.async = true;
				hm.src = "https://api.ipify.org/?format=jsonp&callback=getIP";
				var s = document.getElementsByTagName("script")[0]; 
				s.parentNode.insertBefore(hm, s);
			}
			//window.addEventListener("load", asyncLoad);
			/**
			 * 获取IP end
			 */
		</script>
		<script src="<%= BASE_URL %>static/js/quill.min.js"></script>
		<!-- <script src="<%= BASE_URL %>static/js/image-resize.min.js"></script> -->
	</body>
	<!-- by include -->
</html>